import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/test/HomeView.vue'


const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/test/AboutView.vue')
  },
  {
    path:'/register',
    name:'Register',
    component: () => import(/* webpackChunkName: "about" */ '../views/Register.vue')
  },
  {
    path:'/login',
    name:'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path:'/index',
    name:'index',
    component: () => import(/* webpackChunkName: "about" */ '../views/Index.vue')
  },
  {
    path:'/goods/:proId',
    name:'goods',
    component: () => import(/* webpackChunkName: "about" */ '../views/ProductDetails.vue')
  },
  {
    path:'/order/:orderNumber',
    name:'order',
    component: () => import(/* webpackChunkName: "about" */ '../views/OrderPage.vue')
  },
  {
    path:'/order/page',
    name:'orderPage',
    component: () => import(/* webpackChunkName: "about" */ '../views/CustomerOrder.vue')
  },
  {
    path:'/favourite',
    name:'favourite',
    component: () => import(/* webpackChunkName: "about" */ '../views/FavouritePage.vue')
  },
  {
    path:'/userPage',
    name:'userPage',
    component: () => import(/* webpackChunkName: "about" */ '../views/UserData.vue')
  },
  {
    path:'/adminOrder',
    name:'adminOrder',
    component: () => import(/* webpackChunkName: "about" */ '../views/AdminOrder.vue')
  },
  {
    path:'/adminUser',
    name:'adminUser',
    component: () => import(/* webpackChunkName: "about" */ '../views/AdminUser.vue')
  },
  {
    path:'/manageProduct',
    name:'manageProduct',
    component: () => import(/* webpackChunkName: "about" */ '../views/ManageProduct.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
